package day10_poly.demo07_Exception;
//try-catch可能捕获异常也可能没有异常
//throws表示抛出一个异常
public class Demo05 {
    public static void main(String[] args) throws Exception{
        jsq(2,"*",2);
        jsq(5,"/",0);
    }
    public static void jsq(int a,String f,int b)throws Exception{
        switch (f){
            case "*":
                System.out.println(a*b);
                break;
            case"/":
                System.out.println(a/b);
                break;
        }
    }
}
